/*
 * @Description:
 * @Author: maxyang
 * @Date: 2022-05-19 14:39:19
 * @LastEditTime: 2022-06-05 18:05:54
 * @LastEditors: liutq
 * @Reference:
 */
/*
 * @Description:
 * @Author: maxyang
 * @Date: 2022-05-19 14:39:19
 * @LastEditTime: 2022-06-05 10:23:29
 * @LastEditors: liutq
 * @Reference:
 */
package service

import (
	"github.com/maxyang107/jinglan/common"
	"github.com/maxyang107/jinglan/model/announcement"
)

var (
	AnnouncementService = &AnnouncementSer{}
)

type AnnouncementSer struct{}

func (a AnnouncementSer) GetAnnouncementList(query_ common.AnnouncementList) announcement.AnnouncementList {
	if query_.PerPage == 0 {
		query_.PerPage = 10
	}
	return announcement.GetAnnouncementList(query_)
}

func (a AnnouncementSer) GetAnnouncementDetail(query_ common.Detail) announcement.Announcement {
	return announcement.GetAnnouncementDetail(query_.Id)
}
